<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
selection_test(
    [
        '<div contenteditable>',
            '<div>',
                '^abc <b>def</b>ghi|',
            '</div>',
        '</div>'
    ],
    'justifyCenter',
    [
        '<div contenteditable>',
            '<div style="text-align: center;">',
                '^abc <b>def</b>ghi|',
            '</div>',
        '</div>'
    ]);
selection_test(
    [
        '<div contenteditable>',
            '<div style="text-align: right;">',
                '^abc <b>def</b>ghi|',
            '</div>',
        '</div>'
    ],
    'justifyCenter',
    [
        '<div contenteditable>',
            '<div style="text-align: center;">',
                '^abc <b>def</b>ghi|',
            '</div>',
        '</div>'
    ]);
</script>
